a1=1/2
q=1/2
s=0
n=99
for i in range(n):
    s += a1*q**i
    print(s)



def fib(n):
    a, b = 1, 1
    for i in range(n-1):
        a, b = b, a+b
    return a
print (fib(50))



def fib(n):
    if n == 1:
        return [1]
    if n == 2:
        return [1, 1]
    fibs = [1, 1]
    for i in range(2, n):
        fibs.append(fibs[-1] + fibs[-2])
    return fibs
print(fib(50))
